home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Creative Computers
/
Creative Computers CD-ROM, Volume 1 (Legendary Design Technologies, Inc.)(1994).iso
/
shareware
/
fractals
/
mandelsquare
/
mandelsquare.doc
< prev
next >
Wrap
Text File
|
1994-11-17
|
20KB
|
363 lines
========================== MandelSquare 1.6 ==========================
======================================================================
Yet another Mandelbrot set exploration program written by Olaf `Olsen'
Barthel. © Copyright 1991 by Olaf `Olsen' Barthel, Freeware, all
rights reserved.
No guarantee of any kind is made that the program described in this
document is 100% reliable. You use this material on your own risk.
========================= A word of warning ==========================
======================================================================
`MandelSquare' is a very `demanding' program which will run only on
Amiga systems equipped with expensive custom hardware (i.e. '881/'882
accelerator boards, 68020/30/40 processors and real fast ram), a plain
A3000(T/UX) will do as well, but not quite as nicely as an A2000 with
a GVP A3001 expansion board, an A3000(T/UX) fitted with an '040 card
or an A4000.
Kickstart 2.04 (v37.175 or higher) and Workbench 2.1 or Workbench
3.0 are required to run this program.
YOU HAVE BEEN WARNED!
============================= Background =============================
======================================================================
I have been toying with this kind of program for a long time, I even
started writing it on my ol' faithful A500 back in 1990. Since I
don't have a great interest in mathematics (which currently causes
`some' problems while studying computer science at university) I
started this project to learn a bit about complex numbers and to shake
off some of the trouble mentioned above.
The first internal revisions of this program would simply calculate
pictures dot by dot. This technique while accurate and precise takes
quite a lot of time (see Thomas R. Wilcox' `MSE'). There are faster
ways to calculate a picture, such as the recursive routine
`MandelSquare' uses: the screen is divided into four areas; if the
pixels in the four corners are of the same colour, the rectangle is
filled in this colour, if not, the area is divided into four
rectangles and the same procedure is applied again. This technique
relies on the fact that the Mandelbrot set does not contain isolated
points, each outline rests within a different outline, just like a
matrioshka puppet is contained in its mother puppet. `MandelSquare'
uses a very simple form of this algorithm which requires that the
rectangles are square, and that's how the child received a name...
`MandelSquare' uses the standard z²+c algorithm to generate
pictures, a numerical coprocessor or an '040 is required since the
calculation is done in a fast hand-coded '881/'882 assembly language
subroutine. While throughout the whole program double precision
values (64 bits) are used for calculation, the '881/'882 assembly
language subroutine uses extended precision (96 bits) to do its job.
While I can and will not claim that `MandelSquare' is the fastest
Mandelbrot set exploration program, I may say that it is the fastest
program in respect to its accuracy and the algorithm employed.
Colours are assigned to pixels based on a linear transition table
which avoids the unpleasant look of broken colour ranges. Transition
tables are created according to the screen resolution (256/32/16
colours).
Except for the rectangle filling routines `MandelSquare' uses
custom assembly language routines to do the picture rendering. The
program still tries to be very careful not to disturb system imagery
such as the menu bar and the pull down menus.
The screen size depends on the video overscan settings of your
machine. The following text assumes a resolution of 256 × 256 pixels
(low resolution) and 512 × 512 pixels (high resolution).
In late August I played with the idea of adding animation support
to the program, and here it is: select the area you wish to zoom to
and `MandelSquare' will generate a standard Anim-Opt-5 animation file
while it zooms to the indicated spot. The animation file can be
viewed using programs such as `ShowAnim', `DisplayAnim', `PPAnim',
`Animagic', `The Director', `DPaint III/IV' and `MandelSquare' itself,
of course. Many thanks to Gary Bonham and Jim Kent for releasing the
anim file creation/delta compression and replay code to the public
domain.
At startup time `MandelSquare' tries to read a file
called `MandelSquare.Title' which happens to be the standard
Mandelbrot set picture where all explorations will start. If the
named file cannot be found the program will generate the picture it
needs, and it is recommended to save it to disk under the name
mentioned before.
Support for Kickstart 3.0 and the AGA chip set was added in late
summer 1992, primarily to create an application to test the A4000. As
of this writing, the maximum screen depth is limited to eight
bitplanes, which yields 256 different colours. The palette range is
currently limited to eight bits per component (red, green, blue) which
yields 16,777,216 distinct colours. The screen size has to be exactly
square for this program to work correctly. If a monitor driver does
not support this resolution, the corresponding display mode will not
be included in the list to choose from.
============================= The menus ==============================
======================================================================
Following is a description of the functions and options associated
with the pull down menus.
Open picture........... Opens a picture file in IFF-ILBM format
created by `MandelSquare', reads and displays
it. Since coordinates, number of iterations
and screen width are saved with the picture
you may continue exploring from the point
where you saved it.
Save picture........... Saves the current picture under the last name
a picture file was loaded. If no file name
was loaded yet, you will be prompted to
provide a file name.
Save picture as........ Saves the current picture under a name you
have to provide.
Priority............... This menu allows you to select the task
priority `MandelSquare' will run under. While
0 is the standard priority the majority of
tasks and processes will execute on your
machine you may want to change this value to
-5 to save processing time other tasks may
wish to allocate or to +5 to make
`MandelSquare' allocate more processing time
than possibly available when running under
priority 0.
Replay animation....... Will load and replay any animation file
which meets the following conditions:
- Since the replay routines do not open their
own display (as most anim players do) it
will use the `MandelSquare' screen for
display. This means that any animation to
be replayed must be recorded in the same
resolution (width, height, depth) of the
current screen.
- The animation file must be compressed using
delta mode 5.
- There must be enough memory available to
load the animation frames. Any animation
which does not fit into memory will be
truncated.
If successfully loaded the animation will
be p